<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>商家管理系统</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="/layuiadmin/layui/css/layui.css"
	media="all">
<link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css"
	href="/css/plugins/dropzone/basic.css" />
<link rel="stylesheet" type="text/css"
	href="/css/plugins/dropzone/dropzone.css" />
<link rel="stylesheet" type="text/css"
	href="/css/plugins/layui-formSelect/formSelects-v4.css" />
</head>
<body>
	<div class="layui-fluid">
		<div class="layui-card">
			<div class="layui-form layui-card-header layuiadmin-card-header-auto">
				<div class="layui-form-item">
					<div class="layui-inline">
						<div class="layui-form-label">支付方式：</div>
						<div class="layui-input-block">
							<select name="payType">
								<option value="">请选择</option>
								<c:forEach items="${payTypeList}" var="t">
									<c:if test="${t.id != 4 }">
										<option value="${t.id}" ${order.payType==t.id?'selected="selected"':'' }>${t.name}</option>
									</c:if>
								</c:forEach>
							</select>
						</div>
					</div>
					<div class="layui-inline">
						<div class="layui-form-label">下单时间：</div>
						<div class="layui-input-block">
							<input class="layui-input" name="queryTime" id="laydate-cn"
								autocomplete="off">
						</div>
					</div>
					<div class="layui-inline">
						<div class="layui-col-sm9 layui-col-sm-offset3">
							<button class="layui-btn layuiadmin-btn-list" lay-submit
							lay-filter="LAY-app-contlist-search">查询</button>
						</div>
					</div>
				</div>
			</div>

			<div class="layui-card-body">
				<table class="layui-table" id="table" lay-filter="table">
				</table>
			</div>
		</div>
	</div>
	<script src="/layuiadmin/layui/layui.js"></script>
	<script type="text/javascript" src="/js/jquery/jquery.min.js"></script>
	<script>
		layui.config({
			base : '/layuiadmin/' //静态资源所在路径
		}).extend({
			index : 'lib/index' //主入口模块
		}).use([ 'index', 'form', 'laydate', 'table'], function() {
			var $ = layui.$, layer = layui.layer, admin = layui.admin, form = layui.form, 
			element = layui.element, laydate = layui.laydate, table = layui.table;
			form.render('select');
			element.render();
			laydate.render({
				elem : '#laydate-cn',
				range : '~'
			});
	
			table.render({
				elem : '.layui-table',
				url : '/business/queryOfflineList',
				page:true,
				request: {
					pageName: 'current', //页码的参数名称，默认：page
					limitName: 'size' //每页数据量的参数名，默认：limit
				},
				cols : [[
					{field : 'cNickName', title:'用户昵称', minWidth:120},
					{field : 'payTypeName', title:'支付方式', minWidth:120},
					{field : 'payCode', title:'流水号', minWidth:120},
					{field : 'money', title:'支付金额', minWidth:120},
					{field : 'point', title:'赠送积分', minWidth:120},
					{field : 'createTime', title:'支付时间', minWidth:180,templet:"<div>{{layui.util.toDateString(d.createTime,'yyyy-MM-dd HH:mm:ss')}}</div>"},
				]],
				skin : "row",
				even: true,
				size:"lg"
			});
			
			//监听搜索
		    form.on('submit(LAY-app-contlist-search)', function(data){
		      var field = data.field;
		      //执行重载
		      table.reload('table', {
		        where: field
		      });
		    });
		});

	</script>
</body>
</html>